<!--
 * @Author: WLang
 * @LastEditors: WLang
 * @Description: 
 * @Date: 2023-07-15 15:34:27
 * @LastEditTime: 2023-07-19 15:32:37
 * @FilePath: \myblog\src\mviews\ColumnView.vue
-->
<template>
  <div class="blogm-cloumn">
    <van-tabs class="blogm-cloumn--tabs" v-model="active">
      <van-tab v-for="item in columnList" :name="item.name" :key="item.id" :title="item.name">
        <MobileArticleVue :columnId="item.id"/>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import MobileArticleVue from './MobileArticle.vue';
export default {
  components:{
    MobileArticleVue
  },
  data(){
    return {
      active: 0,
      columnList: []
    }
  },
created(){
  this.getColumns();
},
mounted(){},
watch:{},
computed:{},
methods:{
  async getColumns() {
    try{
      let result = await this.$api({type: 'columns'})
      this.columnList = result.list
    }
    catch(err) {
      console.log(err)
    }
  }
},
}
</script>
<style lang="scss" scoped>
</style>